package avicit.bdp.oss.utils.upload.utils.common;

/**
 * @金航数码科技有限责任公司
 * @作者：developer
 * @邮箱：developer@avic-digital.com
 * @创建时间： 2020-12-09
 * @类说明：BucketAuditDto
 * @修改记录：
 * @注意事项：
 * @主要功能：断点续传/分片上传常量
 */
public class Constant {
    /**
     * 时间格式
     */
    public static final String DATA_FORMAT = "yyyy-MM-dd";

    /**
     * 连字符/点号/逗号
     */
    public static final String HYPHEN = "-";
    public static final String DOT = ".";
    public static final String ESCAPE_DOT = "//.";
    public static final String COMMA = ",";
    public static final String AND = "&";
    public static final String SLASH = "/";

    /**
     * 任务管理使用
     */
    public static final String OSS_UPLOAD_TASK_INFO_KEY = "OSS_UPLOAD_TASK_INFO";
    public static final String OSS_UPLOAD_CHUNK_INFO_KEY = "OSS_UPLOAD_CHUNK_INFO";
    public static final String OSS_UPLOAD_TMP_FILE_QUEUE = "OSS_UPLOAD_TMP_FILE_QUEUE";
    public static final String OSS_EXPIRE_DEL_KEY = "OSS_EXPIRE_DEL_KEY";
    public static final String UPLOADED_STR = "uploaded";
    public static final String UPLOAD_STATUS = "status";
    public static final String UPLOAD_PROGRESS= "progress";
    public static final String ZSET = "zset";
    public static final String HASH = "hash";
    public static final String DEFAULT_TMP_FILE_PATH = "/tmp/bdp";

    /**
     * 保留为百分比
      */
    public static final String PERCENT_FORMAT = "0.00%";

    /**
     * Redis相关配置
     */
    public static final long REDIS_KEY_EXPIRE_TIME_SECONDS = 2 * 24 * 60 * 60;
    public static final String LOCK_PREFIX = "oss_redis_lock_";
    public static final int LOCK_EXPIRE = 1000;
    public static final String OSS_GENEERATE_ID_LOCK_KEY = "oss_generate_id_";
    public static final long TASK_SUCCESS_EXPIRE_TIME = 30;
}
